{{#logicNodeModel.exceptionLinkModel}}
    try {
{{/logicNodeModel.exceptionLinkModel}}
{{#if logicNodeModel.pSDELogicNode.pSDELogicNodeParams}}
    Map param =new HashMap();
    {{#each logicNodeModel.pSDELogicNode.pSDELogicNodeParams as |nodeParam|}}
        {{#if (eq nodeParam.srcValueType "SRCDLPARAM")}}
    param.put("param{{@index}}",_{{lowerCase nodeParam.srcPSDELogicParam.codeName}}.get("{{lowerCase nodeParam.srcFieldName}}"));
        {{else if (eq nodeParam.srcValueType "WEBCONTEXT")}}
    param.put("param{{@index}}",_default.get("{{lowerCase nodeParam.srcFieldName}}"));
        {{else if (eq nodeParam.srcValueType "APPDATA")}}
        {{else if (eq nodeParam.srcValueType "APPLICATION")}}
        {{else if (eq nodeParam.srcValueType "SESSION")}}
    param.put("param{{@index}}",curuser.getSessionParams().get("{{lowerCase nodeParam.srcFieldName}}"));
        {{else if (eq nodeParam.srcValueType "DATACONTEXT")}}
    param.put("param{{@index}}",_default.get("{{lowerCase nodeParam.srcFieldName}}"));
        {{else if (eq nodeParam.srcValueType "ENVPARAM")}}
        {{else if (eq nodeParam.srcValueType "VIEWPARAM")}}
        {{else if (eq nodeParam.srcValueType "NONE")}}
    param.put("param{{@index}}", null);
        {{else if (eq nodeParam.srcValueType "NULLVALUE")}}
    param.put("param{{@index}}", null);
        {{else if (eq nodeParam.srcValueType "SRCVALUE")}}
    param.put("param{{@index}}", "{{lowerCase nodeParam.srcValue}}"));
        {{/if}}
    {{/each}}
{{else}}
    Map param = null;
{{/if}}
    String strSql="""
{{logicNodeModel.rawSql}}
    """
{{#if logicNodeModel.pSDELogicNode.isFillDstLogicParam}}
    {{#if logicNodeModel.pSDELogicNode.isFillDstLogicParam}}
    java.util.List<JSONObject> entities = SpringContextHolder.getBean({{pascalCase logicNodeModel.logicModel.entity.codeName}}Service.class).select(strSql,param);//SQL调用
    if(entities.size()>0 && !ObjectUtils.isEmpty(entities.get(0))){
        JSONObject entity = entities.get(0);
        {{#if logicNodeModel.pSDELogicNode.dstPSDELogicParam.paramPSDataEntity}}
        for (Map.Entry entry : entity.entrySet()) {
            _{{lowerCase logicNodeModel.pSDELogicNode.dstPSDELogicParam.codeName}}.set(String.valueOf(entry.getKey()),entry.getValue());
        }
        {{else}}
        _{{lowerCase logicNodeModel.pSDELogicNode.dstPSDELogicParam.codeName}}.putAll(entity);
        {{/if}}
    }
    {{else}}
    SpringContextHolder.getBean({{pascalCase logicNodeModel.logicModel.entity.codeName}}Service.class).select(strSql,param)
    {{/if}}
{{else}}
    SpringContextHolder.getBean({{pascalCase logicNodeModel.logicModel.entity.codeName}}Service.class).select(strSql,param)
{{/if}}
{{#logicNodeModel.exceptionLinkModel}}
    } catch (Exception e) {
        //异常处理
        {{camelCase exceptionLinkModel.pSDELogicLink.dstPSDELogicNode.codeName}}()
    }
{{/logicNodeModel.exceptionLinkModel}}